<!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width,initial-scale=1.0">
  <title>Vue+Canvas实现图片裁切与上传</title>
</head>

<body>
  <!-- REM COMPUTED -->
  <script>
    ~ function () {
      function computed() {
        let HTML = document.documentElement,
          deviceW = HTML.clientWidth,
          designW = 750,
          ratio = deviceW / designW * 100;
        if (deviceW >= designW) ratio = 100;
        HTML.style.fontSize = ratio + 'px';
      }
      computed();
      window.addEventListener('resize', computed);
    }();
  </script>

  <div id="app"></div>
</body>

</html>